<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Volunteer Platform{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
    <nav class="navbar">
        <div class="nav-brand">
            <a href="{{ url_for('index') }}">Volunteer Platform</a>
        </div>
        <div class="nav-links">
            {% if session.get('user_id') %}
                {% if session.get('user_type') == 'admin' %}
                    <a href="{{ url_for('admin_dashboard') }}">Admin Panel</a>
                {% elif session.get('user_type') == 'volunteer' %}
                    <a href="{{ url_for('volunteer_dashboard') }}">Volunteer Panel</a>
                {% elif session.get('user_type') == 'charity' %}
                    <a href="{{ url_for('charity_dashboard') }}">Organization Panel</a>
                {% endif %}
                <a href="{{ url_for('logout') }}">Logout</a>
            {% else %}
                <a href="{{ url_for('login') }}">Login</a>
                <a href="{{ url_for('register') }}">Register</a>
            {% endif %}
        </div>
    </nav>

    <div class="container">
        {% with messages = get_flashed_messages() %}
            {% if messages %}
                <div class="flash-messages">
                    {% for message in messages %}
                        <div class="flash-message">{{ message }}</div>
                    {% endfor %}
                </div>
            {% endif %}
        {% endwith %}

        {% block content %}{% endblock %}
    </div>

    <footer class="footer">
        <p>&copy; 2024 Volunteer Platform. All rights reserved.</p>
    </footer>

    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html> 